home *** CD-ROM | disk | FTP | other *** search
/ Precision Software Appli…tions Silver Collection 1 / Precision Software Applications Silver Collection Volume One (PSM) (1993).iso / tutor / dos1ref.exe / CONTENTS < prev    next >
Text File  |  1990-03-21  |  22KB  |  388 lines

  1.  
  2.    **  Programmer's  Technical  Reference  for  MSDOS  and  the  IBM  PC **
  3.  ─────────────────────────┤ Shareware User Version ├───────────────────────────
  4.                     Copyright (c) 1987, 1990 Dave Williams
  5.  
  6.                                TABLE OF CONTENTS
  7.  
  8.   Note to shareware version:
  9.  
  10.   Chapters 9 through 17 and the appendices are not included in the shareware 
  11. version of the Reference. This isn't CrippleWare; what you have is complete 
  12. and useful (though perhaps slightly out of date, depending on how old this
  13. archive is when you get it). The deletions were to keep the file size down 
  14. around 200k for easier transmission.
  15.  
  16.  
  17.  
  18.  
  19. INTRO           Introduction, credits, copyrights
  20.  
  21.  
  22. CHAPTER 1       DOS and the PC
  23.  
  24. Some History .......................................................... 1**1
  25. What is DOS? .......................................................... 1**2
  26. Other Operating Systems ............................................... 1**3
  27. Specific Versions of MS/PC-DOS ........................................ 1**4
  28. The Operating System Heirarchy ........................................ 1**5
  29. DOS Structure ......................................................... 1**6
  30. DOS Initialization .................................................... 1**7
  31.  
  32.  
  33. CHAPTER 2       Low Memory and Absolute Addresses
  34.  
  35. Introduction .......................................................... 2**1
  36. System Memory Map ..................................................... 2**2
  37. PC Port Assignment .................................................... 2**3
  38. Reserved Memory Locations ............................................. 2**4
  39.         Interrupt Vector Table .......................................    "
  40.         BIOS Data Area ................................................   "
  41.         DOS Data Area .................................................   "
  42.         BASIC Data Area ...............................................   "
  43.         EGA Signature .................................................   "
  44.         Model and BIOS ID .............................................   "
  45. The IBM PC System Interrupts (Overview) ............................... 2**5
  46.         Quick Chart 00h-0FFh ..........................................   "
  47. The IBM-PC System Interrupts (in detail) .............................. 2**6
  48.         00h-0Fh .......................................................   "
  49.  
  50.  
  51. CHAPTER 3       The IBM ROM BIOS
  52.  
  53. Calling the ROM BIOS .................................................. 3**1
  54. Interrupt 10h  Video Services ......................................... 3**2
  55. Interrupt 11h  Equipment Check ........................................ 3**3
  56. Interrupt 12h  Memory Size ............................................ 3**4
  57. Interrupt 13h  Disk Functions ......................................... 3**5
  58. Interrupt 14h  Initialize and Access Serial Port ...................... 3**6
  59.                FOSSIL Drivers ......................................... 3**7
  60. Interrupt 15h  Cassette I/O ........................................... 3**8
  61. Interrupt 16h  Keyboard I/O ........................................... 3**9
  62. Interrupt 17h  Printer ................................................ 3**10
  63. Interrupt 18h  ROM BASIC .............................................. 3**11
  64. Interrupt 19h  Bootstrap Loader ....................................... 3**12
  65. Interrupt 1Ah  Time of Day ............................................ 3**13
  66. Interrupt 1Bh  Control-Break .......................................... 3**14
  67. Interrupt 1Ch  Timer Tick ............................................. 3**15
  68. Interrupt 1Dh  Vector of Video Initialization Parameters .............. 3**16
  69. Interrupt 1Eh  Vector of Diskette Controller Parameters ............... 3**17
  70. Interrupt 1Fh  Ptr to Graphics Character Extensions (Graphics Set 2) .. 3**18
  71.  
  72.  
  73. CHAPTER 4       DOS Function Requests
  74.  
  75. DOS Registers ......................................................... 4**1
  76. DOS Stacks ............................................................ 4**2
  77. DOS Interrupts ........................................................ 4**3
  78. Interrupt 20h  Terminate Current Program .............................. 4**4
  79. DOS Services (quick list) ............................................. 4**5
  80. Calling the DOS Services .............................................. 4**6
  81. Version Specific Information .......................................... 4**7
  82. DOS Services in Detail ................................................ 4**8
  83.  
  84.  
  85. CHAPTER 5       Interrupts 22h through 0FFh
  86.  
  87. Interrupt 22h   Terminate Address ..................................... 5**1
  88. Interrupt 23h   Ctrl-Break Exit Address ............................... 5**2
  89. Interrupt 24h   Critical Error Handler ................................ 5**3
  90. Interrupt 25h   Absolute Disk Read .................................... 5**4
  91. Interrupt 26h   Absolute Disk Write ................................... 5**5
  92. Interrupt 27h   Terminate And Stay Resident ........................... 5**6
  93. Interrupt 28h   (not documented by Microsoft) ......................... 5**7
  94. Interrupt 29h   (not documented by Microsoft) ......................... 5**8
  95. Interrupt 2Ah   Microsoft Networks - Session Layer Interrupt .......... 5**9
  96. Interrupt 2Bh   Unknown ............................................... 5**10
  97. Interrupt 2Ch   Unknown ............................................... 5**11
  98. Interrupt 2Dh   Unknown ............................................... 5**12
  99. Interrupt 2Eh   Alternate EXEC (DOS 2.0+) ............................. 5**13
  100. Interrupt 2Fh   Multiplex Interrupt ................................... 5**14
  101. Interrupt 30h   FAR jump instruction for CP/M-style calls ............. 5**15
  102. Interrupt 31h   Unknown ............................................... 5**16
  103. Interrupt 32h   Unknown ............................................... 5**17
  104. Interrupt 33h   Used by Microsoft Mouse Driver Function Calls ......... 5**18
  105. Interrupt 34h   Turbo C/Microsoft languages - Floating Point emulation  5**19
  106. Interrupt 35h   Turbo C/Microsoft languages - Floating Point emulation  5**20
  107. Interrupt 36h   Turbo C/Microsoft languages - Floating Point emulation  5**21
  108. Interrupt 37h   Turbo C/Microsoft languages - Floating Point emulation  5**22
  109. Interrupt 38h   Turbo C/Microsoft languages - Floating Point emulation  5**23
  110. Interrupt 39h   Turbo C/Microsoft languages - Floating Point emulation  5**24
  111. Interrupt 3Ah   Turbo C/Microsoft languages - Floating Point emulation  5**25
  112. Interrupt 3Bh   Turbo C/Microsoft languages - Floating Point emulation  5**26
  113. Interrupt 3Ch   Turbo C/Microsoft languages - Floating Point emulation  5**27
  114. Interrupt 3Dh   Turbo C/Microsoft languages - Floating Point emulation  5**28
  115. Interrupt 3Eh   Turbo C/Microsoft languages - Floating Point emulation  5**29
  116. Interrupt 3Fh   Overlay Manager Interrupt (Microsoft LINK.EXE) ........ 5**30
  117. Interrupt 40h   Hard Disk BIOS ........................................ 5**31
  118. Interrupt 41h   Hard Disk Parameters .................................. 5**32
  119. Interrupt 42h   Pointer to screen BIOS entry .......................... 5**33
  120. Interrupt 43h   Pointer to EGA Graphics Character Table ............... 5**34
  121. Interrupt 44h   Pointer to graphics character table ................... 5**35
  122. Interrupt 45h   Reserved by IBM  (not initialized) .................... 5**36
  123. Interrupt 46h   Pointer to second hard disk parameter block ........... 5**37
  124. Interrupt 47h   Reserved by IBM  (not initialized) .................... 5**38
  125. Interrupt 48h   Cordless Keyboard Translation ......................... 5**39 
  126. Interrupt 49h   Non-keyboard Scan Code Translation Table Address (PCjr) 5**40
  127. Interrupt 4Ah   Real-Time Clock Alarm (Convertible, PS/2) ............. 5**41
  128. Interrupt 4Bh   Reserved by IBM  (not initialized) .................... 5**42
  129. Interrupt 4Ch   Reserved by IBM  (not initialized) .................... 5**43
  130. Interrupt 4Dh   Reserved by IBM  (not initialized) .................... 5**44
  131. Interrupt 4Eh   Reserved by IBM  (not initialized) .................... 5**45
  132. Interrupt 4Fh   Reserved by IBM  (not initialized) .................... 5**46
  133. Interrupt 50-57 IRQ0-IRQ7 Relocation .................................. 5**47
  134. Interrupt 58h   Reserved by IBM  (not initialized) .................... 5**48
  135. Interrupt 59h   Reserved by IBM  (not initialized) .................... 5**49
  136. Interrupt 5Ah   Reserved by IBM  (not initialized)  ................... 5**50
  137. Interrupt 5Bh   Reserved by IBM  (not initialized) .................... 5**51
  138. Interrupt 5Ah   Cluster Adapter BIOS entry address .................... 5**52
  139. Interrupt 5Bh   Reserved by IBM  (not initialized) .................... 5**53
  140. Interrupt 5Ch   NETBIOS interface entry port, TOPS .................... 5**54
  141. Interrupt 5Dh   Reserved by IBM  (not initialized) .................... 5**55
  142. Interrupt 5Eh   Reserved by IBM  (not initialized) .................... 5**56
  143. Interrupt 5Fh   Reserved by IBM  (not initialized) .................... 5**57
  144. Interrupt 60h-67h  User Program Interrupts ............................ 5**58
  145. Interrupt 60h   Network OS Interface .................................. 5**59
  146. Interrupt 67h   Expanded Memory Board Driver Interrupt ................ 5**60
  147. Interrupt 68h   Not Used  (not initialized) ........................... 5**61
  148. Interrupt 69h   Not Used  (not initialized) ........................... 5**62
  149. Interrupt 6Ah   Not Used  (not initialized) ........................... 5**63
  150. Interrupt 6Bh   Not Used  (not initialized) ........................... 5**64
  151. Interrupt 6Ch   System Resume Vector (Convertible) .................... 5**65
  152. Interrupt 6Dh   Not Used  (not initialized) ........................... 5**66
  153. Interrupt 6Eh   Not Used  (not initialized) ........................... 5**67
  154. Interrupt 6Fh   10-Net API............................................. 5**68
  155. Interrupt 70h   IRQ 8, Real Time Clock Interrupt (AT, XT/286, PS/2) ... 5**69
  156. Interrupt 71h   IRQ 9, Redirected to IRQ 8 (AT, XT/286, PS/2) ......... 5**70
  157. Interrupt 72h   IRQ 10  (AT, XT/286, PS/2)  Reserved .................. 5**71
  158. Interrupt 73h   IRQ 11  (AT, XT/286, PS/2)  Reserved .................. 5**72
  159. Interrupt 74h   IRQ 12  Mouse Interrupt (PS/2) ........................ 5**73
  160. Interrupt 75h   IRQ 13, Coprocessor Error (AT) ........................ 5**74
  161. Interrupt 76h   IRQ 14, Hard Disk Controller (AT, XT/286, PS/2) ....... 5**75
  162. Interrupt 77h   IRQ 15 (AT, XT/286, PS/2)  Reserved ................... 5**76
  163. Interrupt 78h   Not Used .............................................. 5**77
  164. Interrupt 79h   Not Used .............................................. 5**78
  165. Interrupt 7Ah   Reserved .............................................. 5**79
  166. Interrupt 7Bh-7Eh  Not Used by IBM .................................... 5**80
  167. Interrupt 7Ch   REXX-PC API ........................................... 5**81
  168. Interrupt 7Fh   IBM 8514/A Graphics Adapter API ....................... 5**82
  169. Interrupt 80h-85h  Reserved by BASIC .................................. 5**83
  170. Interrupt 86h   Int 18 when relocated by NETBIOS ...................... 5**84
  171. Interrupt 86h-0F0h  Used by BASIC when BASIC interpreter is running ... 5**85
  172. Interrupt 0A4h  Right Hand Man API .................................... 5**86
  173. Interrupt 0D4h  PC-MOS/386 API ........................................ 5**87
  174. Interrupt 0E0h  Digital Research CP/M-86 function calls ............... 5**88
  175. Interrupt 0E1h  PC Cluster Disk Server Information .................... 5**89
  176. Interrupt 0E2h  PC Cluster Program .................................... 5**90
  177. Interrupt 0E4h  Logitech Modula-2 v2.0   Monitor Entry ................ 5**91
  178. Interrupt 0E5h  Not Used .............................................. 5**92
  179. Interrupt 0E6h  Not Used .............................................. 5**93
  180. Interrupt 0E7h  Not Used .............................................. 5**94
  181. Interrupt 0E8h  Not Used .............................................. 5**95
  182. Interrupt 0E9h  Not Used .............................................. 5**96
  183. Interrupt 0EAh  Not Used .............................................. 5**97
  184. Interrupt 0EBh  Not Used .............................................. 5**98
  185. Interrupt 0ECh  Not Used .............................................. 5**99
  186. Interrupt 0EDh  Not Used ............................................. 5**100
  187. Interrupt 0EEh  Not Used ............................................. 5**101
  188. Interrupt 0EFh  GEM interface (Digital Research) ..................... 5**102
  189. Interrupt 0F0h  unknown .............................................. 5**103
  190. Interrupts 0F1h-0FFh  (absolute addresses 3C4h-3FFh) ................. 5**104
  191. Interrupt 0F4h  Not Used ............ ................................ 5**105
  192. Interrupt 0F5h  Not Used ............ ................................ 5**106
  193. Interrupt 0F8h  Set Shell Interrupt (OEM) ............................ 5**107
  194. Interrupt 0F9h  Reserved ............................................. 5**108
  195. Interrupt 0FAh  USART ready (RS-232C) ................................ 5**109
  196. Interrupt 0FBh  USART RS ready (keyboard) ............................ 5**110
  197. Interrupt 0FCh  Unknown ...............................................5**111
  198. Interrupt 0FDh  reserved for user interrupt .......................... 5**112
  199. Interrupt 0FEh  reserved by IBM ...................................... 5**113
  200. Interrupt 0FFh  reserved by IBM ...................................... 5**114
  201.  
  202.  
  203. CHAPTER 6       DOS Control Blocks and Work Areas
  204.  
  205. DOS Address Space ..................................................... 6**1
  206. Storage Blocks ........................................................ 6**2
  207. Disk Transfer Area (DTA) .............................................. 6**3
  208. Program Segment Prefix ................................................ 6**4
  209. Memory Control Blocks ................................................. 6**5
  210. DOS Program Segment ................................................... 6**6
  211.  
  212.  
  213. CHAPTER 7       DOS File Information
  214.  
  215. File Management Functions ............................................. 7**1
  216. FCB Function Calls .................................................... 7**2
  217. Handle Function Calls ................................................. 7**3
  218. Special File Handles .................................................. 7**4
  219. Raw and Cooked File I/O ............................................... 7**5
  220. Number of Open Files Allowed  ......................................... 7**6
  221. Restrictions on FCB Usage ............................................. 7**7
  222. Restrictions on Handle usage .......................................... 7**8
  223. Allocating Space to a File ............................................ 7**9
  224. MSDOS / PCDOS Differences ............................................. 7**10
  225. .COM File Structure ................................................... 7**11
  226. .EXE File Structure ................................................... 7**12
  227. The Relocation Table .................................................. 7**13
  228. "NEW" .EXE Format (Microsoft Windows and OS/2) ........................ 7**14
  229. Standard File Control Block ........................................... 7**15
  230. Extended File Control Block ........................................... 7**16
  231. Disk Transfer Area .................................................... 7**17
  232.  
  233.  
  234. CHAPTER 8       DOS Disk Information
  235.  
  236. The DOS Area .......................................................... 8**1
  237. The Boot Record ....................................................... 8**2
  238. DOS File Allocation Table (FAT) ....................................... 8**3
  239.         Media Descriptor Byte ......................................... 8**4
  240.         12 Bit FATs ................................................... 8**5
  241.         16 Bit FATs ................................................... 8**6
  242.         32 Bit FATs ................................................... 8**7
  243. DOS Disk Directory .................................................... 8**8
  244. The Data Area ......................................................... 8**9
  245. Floppy Disk Types ..................................................... 8**10
  246. Hard Disk Layout ...................................................... 8**11
  247. System Initialization ................................................. 8**12
  248. Boot Record/Partition Table ........................................... 8**13
  249. Hard Disk Technical Information ....................................... 8**14
  250. Determining Hard Disk File Allocation ................................. 8**15
  251. BIOS Disk Functions ................................................... 8**16
  252.  
  253.  
  254. CHAPTER 9       Device Drivers
  255.  
  256.  
  257. CHAPTER 10      Lotus/Intel/Microsoft Expanded Memory Specification
  258.  
  259. History ............................................................... 10**1
  260. Uses of Expanded Memory ............................................... 10**2
  261. DOS and Expanded Memory ............................................... 10**3
  262. Different Memory Types ................................................ 10**4
  263. AST/Quadram/Ashton-Tate Enhanced EMM .................................. 10**5
  264. EMS Address Space Map ................................................. 10**6
  265. Writing Programs That Use Expanded Memory ............................. 10**7
  266. Page Frames ........................................................... 10**8
  267. Calling the Manager ................................................... 10**9
  268. Detecting EMS ......................................................... 10**10
  269. Terminate and Stay Resident (TSR) Program Cooperation ................. 10**11
  270. Expanded Memory Services Quick List ................................... 10**12
  271. Expanded Memory Services .............................................. 10**13
  272.         LIM 3.2 Specification ......................................... 10**14
  273.         LIM 4.0 Specification ......................................... 10**15
  274.         AQA EEMS 3.2 Specification .................................... 10**16
  275.         VCPI API 1.0 .................................................. 10**17
  276. Expanded Memory Manager Error Codes ................................... 10**18
  277.  
  278.  
  279. CHAPTER 11      Conversion Between Operating Systems
  280.  
  281. Overview .............................................................. 11**1
  282. Special Considerations ................................................ 11**2
  283. Example Operating Systems ............................................. 11**3
  284. Atari ST .............................................................. 11**4
  285. CP/M .................................................................. 11**5
  286. MacOS ................................................................. 11**6
  287. AmigaDOS .............................................................. 11**7
  288. OS/2 .................................................................. 11**8
  289. UNIX .................................................................. 11**9
  290.  
  291.  
  292. CHAPTER 12      Microsoft Windows API
  293.  
  294. Overview .............................................................. 12**1
  295. Programming Windows ................................................... 12**2
  296. Versions .............................................................. 12**3
  297. Functions ............................................................. 12**4
  298. Error Codes ........................................................... 12**5
  299.  
  300.  
  301. CHAPTER 13      Network APIs
  302.  
  303. FTP Driver - PC/TCP Packet Driver Specification ....................... 13**1
  304. 10-Net Network ........................................................ 13**2
  305. LANtastic LANOS API ................................................... 13**3
  306. Novell NetWare 2.11 API ............................................... 13**4
  307. APPC/PC ............................................................... 13**5
  308.  
  309.  
  310. CHAPTER 14      Mouse Programming
  311.  
  312. General Information ................................................... 14**1
  313. Register Usage ........................................................ 14**2
  314. Interrupt 33h Function Requests ....................................... 14**3
  315. Interrupt 10h Function Requests ....................................... 14**4
  316.  
  317.  
  318. CHAPTER 15      Register-Level Programming
  319.  
  320. 8555 Peripheral Interface ............................................. 15**1
  321. 8259 Interrupt Controller ............................................. 15**2
  322. AT CMOS RAM Configuration ............................................. 15**3
  323.  
  324.  
  325. CHAPTER 16      Video Programming
  326.  
  327. Quick List of BIOS Interrupt 10h Functions ............................ 16**1
  328. BIOS Interrupt 10h Functions in Detail ................................ 16**2
  329.  
  330.  
  331. CHAPTER 17      Multitasking Shells
  332.  
  333. Introduction .......................................................... 17**1
  334. Programming Practices ................................................. 17**2
  335. TopView/DesQview API (interrupt 15h, "System Services" interface) ..... 17**3
  336. TopView/DesQview API (interrupt 16h, "BIOS Video" interface) .......... 17**4
  337.  
  338.  
  339.  
  340. MISCSTUF        Miscellaneous Stuff
  341.  
  342. AFTERWRD        Afterword
  343.  
  344. CREDITS         Credits and Bibliography
  345.  
  346.  
  347.  
  348.  A P P E N D I C E S
  349.  
  350. APPENDIX  1     Keyboard scan code chart
  351.  
  352. APPENDIX  2     ASCII character chart
  353.  
  354. APPENDIX  3     IBM PC character set
  355.  
  356. APPENDIX  4     IBM PC error code listing
  357.  
  358. APPENDIX  5     Addresses of various manufacturers
  359.  
  360. APPENDIX  6     Hard disk information
  361.  
  362. APPENDIX  7     Floppy drive information
  363.  
  364. APPENDIX  8     Pinouts of various connectors on the IBM PC
  365.  
  366. APPENDIX  9     Sizes of various drivers installed in CONFIG.SYS
  367.  
  368. APPENDIX  10    Common modem instruction sets
  369.  
  370. APPENDIX  11    Glossary of computer terminology
  371.  
  372. APPENDIX  12    Various busses used in MSDOS machines
  373.  
  374. APPENDIX  13    Common filename extensions
  375.  
  376. APPENDIX  14    Clock speeds of various expansion cards
  377.  
  378. APPENDIX  15    Header formats used by various archive utilities
  379.  
  380. APPENDIX  16    Miscellaneous Hardware Information
  381.  
  382. APPENDIX  17    HP LaserJet setup codes
  383.  
  384. APPENDIX  18    ANSI.SYS
  385.  
  386. APPENDIX  19    DEC VT100 escape sequences
  387.  
  388.